package javolution.testing;

import java.util.List;
import javolution.util.FastTable;

/* loaded from: classes2.dex */
public abstract class TestSuite implements Runnable {

    /* loaded from: classes2.dex */
    private static final class GetTestCases extends TestContext {
        FastTable _testCases;

        private GetTestCases() {
            this._testCases = new FastTable();
        }

        @Override // javolution.testing.TestContext
        public boolean doAssertEquals(String str, Object obj, Object obj2) {
            return true;
        }

        @Override // javolution.testing.TestContext
        public void doTest(TestCase testCase) {
            this._testCases.add(testCase);
        }

        @Override // javolution.context.LogContext
        public boolean isErrorLogged() {
            return false;
        }

        @Override // javolution.context.LogContext
        public boolean isInfoLogged() {
            return false;
        }

        @Override // javolution.context.LogContext
        public boolean isWarningLogged() {
            return false;
        }

        @Override // javolution.context.LogContext
        public void logError(Throwable th, CharSequence charSequence) {
        }

        @Override // javolution.context.LogContext
        public void logInfo(CharSequence charSequence) {
        }

        @Override // javolution.context.LogContext
        public void logWarning(CharSequence charSequence) {
        }
    }

    public CharSequence getDescription() {
        return null;
    }

    public List getTestCases() {
        GetTestCases getTestCases = new GetTestCases();
        TestContext.enter(getTestCases);
        try {
            run();
            TestContext.exit();
            return getTestCases._testCases;
        } catch (Throwable th) {
            TestContext.exit();
            throw th;
        }
    }

    @Override // java.lang.Runnable
    public abstract void run();

    public String toString() {
        CharSequence description = getDescription();
        return description == null ? getClass().getName() : description.toString();
    }
}
